import {
  ADD_COUNTER,
  ADD_TO_CART
} from "./mutations-types"
export default {
  [ADD_COUNTER](state , payload) {
    payload.count++;
  },
  [ADD_TO_CART](state , payload) {
    // 添加checked属性，表示购物车里面组件的选中与否，默认选中
    payload.checked = true;
    state.cartList.push(payload)
  }
}
